<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>


<table border='1' cellspacing='0' cellpading='0'>
  <tr><td>编号</td><td>年级名</td></tr>
 <c:forEach items="${grades}" var="g" varStatus="s">
 
  <tr  <c:if test="${s.index%2==0}">
   style='color:red'
  </c:if>>
  <td>${g.id}</td><td>${g.gname}</td>
  </tr>
  </c:forEach>
</table>
</body>
</html>